package io.renren.modules.app.service.huizhou;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import io.renren.modules.app.entity.huizhou.WaichuBaozhang;

public interface IWaichuBaozhang extends JpaRepository<WaichuBaozhang, String>{
	/**
	 * 根据已经完成的流程历史id查询绑定表单
	 * @param hisId 流程id
	 * @return
	 */
    @Query(value = "SELECT * FROM t_hzsdyzxgwwcbzb qj JOIN IBPS_BPM_INST_HIS his ON qj.ID_ = his.biz_key_ WHERE his.id_ =?1", nativeQuery = true)
    WaichuBaozhang findByLcId(String hisId);
}
